<script setup lang='ts'>
import useAuth from '../../hooks/useAuth'

const { loginForm, login } = useAuth()


</script>

<template>
	<view class="login_wrap">
		<view class="title">您好，</view>
		<view class="sub_title">欢迎来到新零售智能管理平台</view>
		<view class="login_form">
			<view class="form_item">
				<input placeholder-class="placeholder" v-model="loginForm.mobile" placeholder="请输入您的账号"/>
			</view>
			<view class="form_item">
				<input type="password" placeholder-class="placeholder" v-model="loginForm.password" placeholder="请输入密码"/>
			</view>
			<view class="btn_login" @click="login">登录</view>
		</view>
		
	</view>
</template>

<style lang='scss'>
.login_wrap {
	position: relative;
	width: 750rpx;
	height: 100vh;
	background: #ffffff;
	overflow: hidden;
	.title {
	  margin: 48rpx 64rpx 8rpx 64rpx;
	  font-size: 64rpx;
	  color: #303030;
	  font-weight: bold;
	}
	.sub_title {
		font-size: 32rpx;
		color: #303030;
		margin: 0 0 40rpx 64rpx;
	}
	.login_form {
		margin-top: 40rpx;
		.form_item {
			margin: 0 64rpx;
			box-sizing: border-box;
			padding: 66rpx 0 14rpx;
			border-bottom: 1px solid rgba(#D8D8D8, 0.4);
			input {
				color: #303030;
			}
			.placeholder {
				font-size: 28rpx;
				color: #B6BDBD;
				line-height: 33rpx;
			}
		}
		.btn_login {
		  width: 622rpx;
		  height: 96rpx;
		  background: linear-gradient( 129deg, #FF776A 0%, #FF4638 100%);
		  border-radius: 48rpx;
			margin: 122rpx auto;
			font-weight: 500;
			font-size: 32rpx;
			color: #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
	.agree {
		width: 750rpx;
		position: absolute;
		bottom: 92rpx;
	  font-size: 22rpx;
	  color: #646466;
	  text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		.yellow {
			color: #FF9832;
		}
	}
}

.code {
  width: 162rpx;
  height: 68rpx;
}

</style>